/*
 * VisFactory.h
 *
 *  Created on: 19.07.2011
 *      Author: sili
 */

#ifndef VISFACTORY_H_
#define VISFACTORY_H_

#include <vdr/plugin.h>
#include <vdr/remote.h>

#include "Controller.h"

class Visualizer;

class VisFactory : ActionListener{

private:

	bool shutdown;

	Visualizer * visualizer;
	Controller * controller;

	// VISUALIZED
	vector<AALAction *> showView;	// all user
	vector<AALAction *> infoView;
	vector<AALAction *> warnView;
	vector<AALAction *> alarmView;

public:
	VisFactory(Controller * _controller);
	virtual ~VisFactory();

	void destroyVisualizer();
	Controller * getController();

	void saveAction(AALAction * _action);
	//int discardAction(AALAction * _action);
	int discardQueuedAction();
	AALAction * getNextAction();
	int getNumOfActions();

	virtual void shutdownOsd();
	virtual cOsdObject * mainMenuAction();

	/**
	 * OVERWRITE
	 * I'm an ActionListener
	 */
	void doAction(AALAction * _action);
	void doMainSavedAction();

private:
	void removeAction(vector<AALAction *> * _workingBase, AALAction * _action);
};

#endif /* VISFACTORY_H_ */
